home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / share / emacs / 19.34 / lisp / uniquify.elc.z / uniquify.elc
Emacs Compiled Lisp  |  1998-10-28  |  7.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6d 73 40 70 73 69 |piled by| rms@psi|
|00000020| 6c 6f 63 69 6e 2e 67 6e | 75 2e 61 69 2e 6d 69 74 |locin.gn|u.ai.mit|
|00000030| 2e 65 64 75 20 6f 6e 20 | 53 75 6e 20 4a 75 6c 20 |.edu on |Sun Jul |
|00000040| 32 38 20 32 31 3a 32 31 | 3a 35 36 20 31 39 39 36 |28 21:21|:56 1996|
|00000050| 0a 3b 3b 3b 20 66 72 6f | 6d 20 66 69 6c 65 20 2f |.;;; fro|m file /|
|00000060| 68 6f 6d 65 2f 66 73 66 | 2f 72 6d 73 2f 65 31 39 |home/fsf|/rms/e19|
|00000070| 2f 6c 69 73 70 2f 75 6e | 69 71 75 69 66 79 2e 65 |/lisp/un|iquify.e|
|00000080| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|00000090| 69 6f 6e 20 31 39 2e 33 | 31 2e 39 37 2e 31 2e 0a |ion 19.3|1.97.1..|
|000000a0| 3b 3b 3b 20 62 79 74 65 | 63 6f 6d 70 20 76 65 72 |;;; byte|comp ver|
|000000b0| 73 69 6f 6e 20 46 53 46 | 20 32 2e 31 30 0a 3b 3b |sion FSF| 2.10.;;|
|000000c0| 3b 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 20 69 |; optimi|zation i|
|000000d0| 73 20 6f 6e 2e 0a 3b 3b | 3b 20 74 68 69 73 20 66 |s on..;;|; this f|
|000000e0| 69 6c 65 20 75 73 65 73 | 20 6f 70 63 6f 64 65 73 |ile uses| opcodes|
|000000f0| 20 77 68 69 63 68 20 64 | 6f 20 6e 6f 74 20 65 78 | which d|o not ex|
|00000100| 69 73 74 20 69 6e 20 45 | 6d 61 63 73 20 31 38 2e |ist in E|macs 18.|
|00000110| 0a 0a 28 69 66 20 28 61 | 6e 64 20 28 62 6f 75 6e |..(if (a|nd (boun|
|00000120| 64 70 20 27 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |dp 'emac|s-versio|
|00000130| 6e 29 0a 09 20 28 6f 72 | 20 28 61 6e 64 20 28 62 |n).. (or| (and (b|
|00000140| 6f 75 6e 64 70 20 27 65 | 70 6f 63 68 3a 3a 76 65 |oundp 'e|poch::ve|
|00000150| 72 73 69 6f 6e 29 20 65 | 70 6f 63 68 3a 3a 76 65 |rsion) e|poch::ve|
|00000160| 72 73 69 6f 6e 29 0a 09 | 20 20 20 20 20 28 73 74 |rsion)..| (st|
|00000170| 72 69 6e 67 2d 6c 65 73 | 73 70 20 65 6d 61 63 73 |ring-les|sp emacs|
|00000180| 2d 76 65 72 73 69 6f 6e | 20 22 31 39 2e 32 39 22 |-version| "19.29"|
|00000190| 29 29 29 0a 20 20 20 20 | 28 65 72 72 6f 72 20 22 |))). |(error "|
|000001a0| 60 75 6e 69 71 75 69 66 | 79 2e 65 6c 27 20 77 61 |`uniquif|y.el' wa|
|000001b0| 73 20 63 6f 6d 70 69 6c | 65 64 20 66 6f 72 20 45 |s compil|ed for E|
|000001c0| 6d 61 63 73 20 31 39 2e | 32 39 20 6f 72 20 6c 61 |macs 19.|29 or la|
|000001d0| 74 65 72 22 29 29 0a 0a | 0a 28 70 72 6f 76 69 64 |ter"))..|.(provid|
|000001e0| 65 20 28 71 75 6f 74 65 | 20 75 6e 69 71 75 69 66 |e (quote| uniquif|
|000001f0| 79 29 29 0a 23 40 35 39 | 38 20 2a 49 66 20 6e 6f |y)).#@59|8 *If no|
|00000200| 6e 2d 6e 69 6c 2c 20 62 | 75 66 66 65 72 20 6e 61 |n-nil, b|uffer na|
|00000210| 6d 65 73 20 61 72 65 20 | 75 6e 69 71 75 69 66 69 |mes are |uniquifi|
|00000220| 65 64 20 77 69 74 68 20 | 70 61 72 74 73 20 6f 66 |ed with |parts of|
|00000230| 20 64 69 72 65 63 74 6f | 72 79 20 6e 61 6d 65 2e | directo|ry name.|
|00000240| 0a 54 68 65 20 76 61 6c | 75 65 20 64 65 74 65 72 |.The val|ue deter|
|00000250| 6d 69 6e 65 73 20 74 68 | 65 20 62 75 66 66 65 72 |mines th|e buffer|
|00000260| 20 6e 61 6d 65 20 73 74 | 79 6c 65 20 61 6e 64 20 | name st|yle and |
|00000270| 69 73 20 6f 6e 65 20 6f | 66 20 60 66 6f 72 77 61 |is one o|f `forwa|
|00000280| 72 64 27 2c 0a 60 72 65 | 76 65 72 73 65 27 2c 20 |rd',.`re|verse', |
|00000290| 60 70 6f 73 74 2d 66 6f | 72 77 61 72 64 27 20 28 |`post-fo|rward' (|
|000002a0| 74 68 65 20 64 65 66 61 | 75 6c 74 29 2c 20 6f 72 |the defa|ult), or|
|000002b0| 20 60 70 6f 73 74 2d 66 | 6f 72 77 61 72 64 2d 61 | `post-f|orward-a|
|000002c0| 6e 67 6c 65 2d 62 72 61 | 63 6b 65 74 73 27 2e 0a |ngle-bra|ckets'..|
|000002d0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 66 69 6c |For exam|ple, fil|
|000002e0| 65 73 20 60 2f 66 6f 6f | 2f 62 61 72 2f 6d 75 6d |es `/foo|/bar/mum|
|000002f0| 62 6c 65 2f 6e 61 6d 65 | 27 20 61 6e 64 20 60 2f |ble/name|' and `/|
|00000300| 62 61 7a 2f 71 75 75 78 | 2f 6d 75 6d 62 6c 65 2f |baz/quux|/mumble/|
|00000310| 6e 61 6d 65 27 0a 77 6f | 75 6c 64 20 68 61 76 65 |name'.wo|uld have|
|00000320| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 62 | the fol|lowing b|
|00000330| 75 66 66 65 72 20 6e 61 | 6d 65 73 20 69 6e 20 74 |uffer na|mes in t|
|00000340| 68 65 20 76 61 72 69 6f | 75 73 20 73 74 79 6c 65 |he vario|us style|
|00000350| 73 3a 0a 20 20 66 6f 72 | 77 61 72 64 20 20 20 20 |s:. for|ward |
|00000360| 20 20 20 20 62 61 72 2f | 6d 75 6d 62 6c 65 2f 6e | bar/|mumble/n|
|00000370| 61 6d 65 20 20 71 75 75 | 78 2f 6d 75 6d 62 6c 65 |ame quu|x/mumble|
|00000380| 2f 6e 61 6d 65 0a 20 20 | 72 65 76 65 72 73 65 20 |/name. |reverse |
|00000390| 20 20 20 20 20 20 20 6e | 61 6d 65 5c 6d 75 6d 62 | n|ame\mumb|
|000003a0| 6c 65 5c 62 61 72 20 20 | 6e 61 6d 65 5c 6d 75 6d |le\bar |name\mum|
|000003b0| 62 6c 65 5c 71 75 75 78 | 0a 20 20 70 6f 73 74 2d |ble\quux|. post-|
|000003c0| 66 6f 72 77 61 72 64 20 | 20 20 6e 61 6d 65 7c 62 |forward | name|b|
|000003d0| 61 72 2f 6d 75 6d 62 6c | 65 20 20 6e 61 6d 65 7c |ar/mumbl|e name||
|000003e0| 71 75 75 78 2f 6d 75 6d | 62 6c 65 0a 20 20 70 6f |quux/mum|ble. po|
|000003f0| 73 74 2d 66 6f 72 77 61 | 72 64 2d 61 6e 67 6c 65 |st-forwa|rd-angle|
|00000400| 2d 62 72 61 63 6b 65 74 | 73 20 20 20 6e 61 6d 65 |-bracket|s name|
|00000410| 3c 62 61 72 2f 6d 75 6d | 62 6c 65 3e 20 20 6e 61 |<bar/mum|ble> na|
|00000420| 6d 65 3c 71 75 75 78 2f | 6d 75 6d 62 6c 65 3e 0a |me<quux/|mumble>.|
|00000430| 20 20 6e 69 6c 20 20 20 | 20 20 20 20 20 20 20 20 | nil | |
|00000440| 20 6e 61 6d 65 20 20 6e | 61 6d 65 3c 32 3e 1f 0a | name n|ame<2>..|
|00000450| 28 64 65 66 76 61 72 20 | 75 6e 69 71 75 69 66 79 |(defvar |uniquify|
|00000460| 2d 62 75 66 66 65 72 2d | 6e 61 6d 65 2d 73 74 79 |-buffer-|name-sty|
|00000470| 6c 65 20 28 71 75 6f 74 | 65 20 70 6f 73 74 2d 66 |le (quot|e post-f|
|00000480| 6f 72 77 61 72 64 29 20 | 28 23 24 20 2e 20 2d 35 |orward) |(#$ . -5|
|00000490| 30 36 29 29 0a 23 40 32 | 31 35 20 2a 49 66 20 6e |06)).#@2|15 *If n|
|000004a0| 6f 6e 2d 6e 69 6c 2c 20 | 72 65 72 61 74 69 6f 6e |on-nil, |reration|
|000004b0| 61 6c 69 7a 65 20 62 75 | 66 66 65 72 20 6e 61 6d |alize bu|ffer nam|
|000004c0| 65 73 20 61 66 74 65 72 | 20 61 20 62 75 66 66 65 |es after| a buffe|
|000004d0| 72 20 68 61 73 20 62 65 | 65 6e 20 6b 69 6c 6c 65 |r has be|en kille|
|000004e0| 64 2e 0a 54 68 69 73 20 | 63 61 6e 20 62 65 20 64 |d..This |can be d|
|000004f0| 61 6e 67 65 72 6f 75 73 | 20 69 66 20 45 6d 61 63 |angerous| if Emac|
|00000500| 73 20 4c 69 73 70 20 63 | 6f 64 65 20 69 73 20 6b |s Lisp c|ode is k|
|00000510| 65 65 70 69 6e 67 20 74 | 72 61 63 6b 20 6f 66 20 |eeping t|rack of |
|00000520| 62 75 66 66 65 72 73 20 | 62 79 20 74 68 65 69 72 |buffers |by their|
|00000530| 0a 6e 61 6d 65 73 20 28 | 72 61 74 68 65 72 20 74 |.names (|rather t|
|00000540| 68 61 6e 20 6b 65 65 70 | 69 6e 67 20 70 6f 69 6e |han keep|ing poin|
|00000550| 74 65 72 73 20 74 6f 20 | 74 68 65 20 62 75 66 66 |ters to |the buff|
|00000560| 65 72 73 20 74 68 65 6d | 73 65 6c 76 65 73 29 2e |ers them|selves).|
|00000570| 1f 0a 28 64 65 66 76 61 | 72 20 75 6e 69 71 75 69 |..(defva|r uniqui|
|00000580| 66 79 2d 61 66 74 65 72 | 2d 6b 69 6c 6c 2d 62 75 |fy-after|-kill-bu|
|00000590| 66 66 65 72 2d 70 20 6e | 69 6c 20 28 23 24 20 2e |ffer-p n|il (#$ .|
|000005a0| 20 2d 31 31 37 39 29 29 | 0a 23 40 31 38 30 20 2a | -1179))|.#@180 *|
|000005b0| 49 66 20 6e 6f 6e 2d 6e | 69 6c 2c 20 70 65 72 6d |If non-n|il, perm|
|000005c0| 69 74 20 75 73 65 72 20 | 74 6f 20 63 68 6f 6f 73 |it user |to choos|
|000005d0| 65 20 6e 61 6d 65 73 20 | 66 6f 72 20 62 75 66 66 |e names |for buff|
|000005e0| 65 72 73 20 77 69 74 68 | 20 73 61 6d 65 20 62 61 |ers with| same ba|
|000005f0| 73 65 20 66 69 6c 65 2e | 0a 49 66 20 74 68 65 20 |se file.|.If the |
|00000600| 75 73 65 72 20 63 68 6f | 6f 73 65 73 20 74 6f 20 |user cho|oses to |
|00000610| 6e 61 6d 65 20 61 20 62 | 75 66 66 65 72 2c 20 75 |name a b|uffer, u|
|00000620| 6e 69 71 75 69 66 69 63 | 61 74 69 6f 6e 20 69 73 |niquific|ation is|
|00000630| 20 70 72 65 65 6d 70 74 | 65 64 20 61 6e 64 20 6e | preempt|ed and n|
|00000640| 6f 0a 6f 74 68 65 72 20 | 62 75 66 66 65 72 20 6e |o.other |buffer n|
|00000650| 61 6d 65 73 20 61 72 65 | 20 63 68 61 6e 67 65 64 |ames are| changed|
|00000660| 2e 1f 0a 28 64 65 66 63 | 6f 6e 73 74 20 75 6e 69 |...(defc|onst uni|
|00000670| 71 75 69 66 79 2d 61 73 | 6b 2d 61 62 6f 75 74 2d |quify-as|k-about-|
|00000680| 62 75 66 66 65 72 2d 6e | 61 6d 65 73 2d 70 20 6e |buffer-n|ames-p n|
|00000690| 69 6c 20 28 23 24 20 2e | 20 2d 31 34 35 35 29 29 |il (#$ .| -1455))|
|000006a0| 0a 23 40 35 39 20 2a 4d | 69 6e 69 6d 75 6d 20 70 |.#@59 *M|inimum p|
|000006b0| 61 72 74 73 20 6f 66 20 | 64 69 72 65 63 74 6f 72 |arts of |director|
|000006c0| 79 20 6e 61 6d 65 20 69 | 6e 63 6c 75 64 65 64 20 |y name i|ncluded |
|000006d0| 69 6e 20 62 75 66 66 65 | 72 20 6e 61 6d 65 2e 1f |in buffe|r name..|
|000006e0| 0a 28 64 65 66 76 61 72 | 20 75 6e 69 71 75 69 66 |.(defvar| uniquif|
|000006f0| 79 2d 6d 69 6e 2d 64 69 | 72 2d 63 6f 6e 74 65 6e |y-min-di|r-conten|
|00000700| 74 20 30 20 28 23 24 20 | 2e 20 2d 31 37 30 32 29 |t 0 (#$ |. -1702)|
|00000710| 29 0a 23 40 32 37 34 20 | 2a 53 74 72 69 6e 67 20 |).#@274 |*String |
|00000720| 73 65 70 61 72 61 74 6f | 72 20 66 6f 72 20 62 75 |separato|r for bu|
|00000730| 66 66 65 72 20 6e 61 6d | 65 20 63 6f 6d 70 6f 6e |ffer nam|e compon|
|00000740| 65 6e 74 73 2e 0a 57 68 | 65 6e 20 60 75 6e 69 71 |ents..Wh|en `uniq|
|00000750| 75 69 66 79 2d 62 75 66 | 66 65 72 2d 6e 61 6d 65 |uify-buf|fer-name|
|00000760| 2d 73 74 79 6c 65 27 20 | 69 73 20 60 70 6f 73 74 |-style' |is `post|
|00000770| 2d 66 6f 72 77 61 72 64 | 27 2c 20 73 65 70 61 72 |-forward|', separ|
|00000780| 61 74 65 73 0a 62 61 73 | 65 20 66 69 6c 65 20 6e |ates.bas|e file n|
|00000790| 61 6d 65 20 66 72 6f 6d | 20 64 69 72 65 63 74 6f |ame from| directo|
|000007a0| 72 79 20 70 61 72 74 20 | 69 6e 20 62 75 66 66 65 |ry part |in buffe|
|000007b0| 72 20 6e 61 6d 65 73 20 | 28 64 65 66 61 75 6c 74 |r names |(default|
|000007c0| 20 22 7c 22 29 2e 0a 57 | 68 65 6e 20 60 75 6e 69 | "|")..W|hen `uni|
|000007d0| 71 75 69 66 79 2d 62 75 | 66 66 65 72 2d 6e 61 6d |quify-bu|ffer-nam|
|000007e0| 65 2d 73 74 79 6c 65 27 | 20 69 73 20 60 72 65 76 |e-style'| is `rev|
|000007f0| 65 72 73 65 27 2c 20 73 | 65 70 61 72 61 74 65 73 |erse', s|eparates|
|00000800| 20 61 6c 6c 0a 66 69 6c | 65 20 6e 61 6d 65 20 63 | all.fil|e name c|
|00000810| 6f 6d 70 6f 6e 65 6e 74 | 73 20 28 64 65 66 61 75 |omponent|s (defau|
|00000820| 6c 74 20 22 5c 22 29 2e | 1f 0a 28 64 65 66 76 61 |lt "\").|..(defva|
|00000830| 72 20 75 6e 69 71 75 69 | 66 79 2d 73 65 70 61 72 |r uniqui|fy-separ|
|00000840| 61 74 6f 72 20 6e 69 6c | 20 28 23 24 20 2e 20 2d |ator nil| (#$ . -|
|00000850| 31 38 31 36 29 29 0a 23 | 40 32 33 32 20 2a 49 66 |1816)).#|@232 *If|
|00000860| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 61 64 64 20 61 20 | non-nil|, add a |
|00000870| 66 69 6c 65 20 6e 61 6d | 65 20 73 65 70 61 72 61 |file nam|e separa|
|00000880| 74 6f 72 20 74 6f 20 64 | 69 72 65 64 20 62 75 66 |tor to d|ired buf|
|00000890| 66 65 72 20 6e 61 6d 65 | 73 2e 0a 49 66 20 60 75 |fer name|s..If `u|
|000008a0| 6e 69 71 75 69 66 79 2d | 62 75 66 66 65 72 2d 6e |niquify-|buffer-n|
|000008b0| 61 6d 65 2d 73 74 79 6c | 65 27 20 69 73 20 60 66 |ame-styl|e' is `f|
|000008c0| 6f 72 77 61 72 64 27 2c | 20 61 64 64 20 74 68 65 |orward',| add the|
|000008d0| 20 73 65 70 61 72 61 74 | 6f 72 20 61 74 20 74 68 | separat|or at th|
|000008e0| 65 20 65 6e 64 3b 0a 69 | 66 20 69 74 20 69 73 20 |e end;.i|f it is |
|000008f0| 60 72 65 76 65 72 73 65 | 27 2c 20 61 64 64 20 74 |`reverse|', add t|
|00000900| 68 65 20 73 65 70 61 72 | 61 74 6f 72 20 61 74 20 |he separ|ator at |
|00000910| 74 68 65 20 62 65 67 69 | 6e 6e 69 6e 67 3b 20 6f |the begi|nning; o|
|00000920| 74 68 65 72 77 69 73 65 | 2c 20 74 68 69 73 0a 76 |therwise|, this.v|
|00000930| 61 72 69 61 62 6c 65 20 | 69 73 20 69 67 6e 6f 72 |ariable |is ignor|
|00000940| 65 64 2e 1f 0a 28 64 65 | 66 76 61 72 20 75 6e 69 |ed...(de|fvar uni|
|00000950| 71 75 69 66 79 2d 74 72 | 61 69 6c 69 6e 67 2d 73 |quify-tr|ailing-s|
|00000960| 65 70 61 72 61 74 6f 72 | 2d 70 20 6e 69 6c 20 28 |eparator|-p nil (|
|00000970| 23 24 20 2e 20 2d 32 31 | 34 31 29 29 0a 28 64 65 |#$ . -21|41)).(de|
|00000980| 66 61 6c 69 61 73 20 27 | 75 6e 69 71 75 69 66 79 |falias '|uniquify|
|00000990| 2d 70 75 73 68 20 27 28 | 6d 61 63 72 6f 20 2e 20 |-push '(|macro . |
|000009a0| 23 5b 28 69 74 65 6d 20 | 6c 69 73 74 29 20 22 c0 |#[(item |list) ".|
|000009b0| 09 c2 0b 09 45 45 87 22 | 20 5b 73 65 74 71 20 6c |....EE."| [setq l|
|000009c0| 69 73 74 20 63 6f 6e 73 | 20 69 74 65 6d 5d 20 35 |ist cons| item] 5|
|000009d0| 5d 29 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 75 |])).(def|alias 'u|
|000009e0| 6e 69 71 75 69 66 79 2d | 66 69 78 2d 6c 69 73 74 |niquify-|fix-list|
|000009f0| 2d 62 61 73 65 20 27 28 | 6d 61 63 72 6f 20 2e 20 |-base '(|macro . |
|00000a00| 23 5b 28 61 29 20 22 c0 | 09 44 87 22 20 5b 63 61 |#[(a) ".|.D." [ca|
|00000a10| 72 20 61 5d 20 32 5d 29 | 29 0a 28 64 65 66 61 6c |r a] 2])|).(defal|
|00000a20| 69 61 73 20 27 75 6e 69 | 71 75 69 66 79 2d 66 69 |ias 'uni|quify-fi|
|00000a30| 78 2d 6c 69 73 74 2d 66 | 69 6c 65 6e 61 6d 65 20 |x-list-f|ilename |
|00000a40| 27 28 6d 61 63 72 6f 20 | 2e 20 23 5b 28 61 29 20 |'(macro |. #[(a) |
|00000a50| 22 c0 c1 5c 6e 44 44 87 | 22 20 5b 63 61 72 20 63 |"..\nDD.|" [car c|
|00000a60| 64 72 20 61 5d 20 33 5d | 29 29 0a 28 64 65 66 61 |dr a] 3]|)).(defa|
|00000a70| 6c 69 61 73 20 27 75 6e | 69 71 75 69 66 79 2d 66 |lias 'un|iquify-f|
|00000a80| 69 78 2d 6c 69 73 74 2d | 62 75 66 66 65 72 20 27 |ix-list-|buffer '|
|00000a90| 28 6d 61 63 72 6f 20 2e | 20 23 5b 28 61 29 20 22 |(macro .| #[(a) "|
|00000aa0| c0 c1 89 5c 6e 44 44 44 | 87 22 20 5b 63 61 72 20 |...\nDDD|." [car |
|00000ab0| 63 64 72 20 61 5d 20 34 | 5d 29 29 0a 28 64 65 66 |cdr a] 4|])).(def|
|00000ac0| 61 6c 69 61 73 20 27 75 | 6e 69 71 75 69 66 79 2d |alias 'u|niquify-|
|00000ad0| 63 61 64 64 64 72 20 27 | 28 6d 61 63 72 6f 20 2e |cadddr '|(macro .|
|00000ae0| 20 23 5b 28 61 29 20 22 | c0 c1 89 89 5c 6e 44 44 | #[(a) "|....\nDD|
|00000af0| 44 44 87 22 20 5b 63 61 | 72 20 63 64 72 20 61 5d |DD." [ca|r cdr a]|
|00000b00| 20 35 5d 29 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 | 5])).(b|yte-code|
|00000b10| 20 22 c0 c1 21 84 08 00 | c2 11 c1 0b 42 13 c0 c4 | "..!...|....B...|
|00000b20| 21 84 14 00 c2 14 c4 0b | 42 13 c2 87 22 20 5b 62 |!.......|B..." [b|
|00000b30| 6f 75 6e 64 70 20 75 6e | 69 71 75 69 66 79 2d 6e |oundp un|iquify-n|
|00000b40| 6f 6e 2d 66 69 6c 65 2d | 62 75 66 66 65 72 2d 6e |on-file-|buffer-n|
|00000b50| 61 6d 65 73 20 6e 69 6c | 20 63 75 72 72 65 6e 74 |ames nil| current|
|00000b60| 2d 6c 6f 61 64 2d 6c 69 | 73 74 20 75 6e 69 71 75 |-load-li|st uniqu|
|00000b70| 69 66 79 2d 70 6f 73 73 | 69 62 6c 79 2d 72 65 73 |ify-poss|ibly-res|
|00000b80| 6f 6c 76 61 62 6c 65 5d | 20 32 29 0a 23 40 32 30 |olvable]| 2).#@20|
|00000b90| 32 20 4d 61 6b 65 73 20 | 66 69 6c 65 20 62 75 66 |2 Makes |file buf|
|00000ba0| 66 65 72 20 6e 61 6d 65 | 73 20 75 6e 69 71 75 65 |fer name|s unique|
|00000bb0| 20 62 79 20 61 64 64 69 | 6e 67 20 73 65 67 6d 65 | by addi|ng segme|
|00000bc0| 6e 74 73 20 66 72 6f 6d | 20 66 69 6c 65 20 6e 61 |nts from| file na|
|00000bd0| 6d 65 2e 0a 49 66 20 60 | 75 6e 69 71 75 69 66 79 |me..If `|uniquify|
|00000be0| 2d 6d 69 6e 2d 64 69 72 | 2d 63 6f 6e 74 65 6e 74 |-min-dir|-content|
|00000bf0| 27 20 3e 20 30 2c 20 61 | 6c 77 61 79 73 20 70 75 |' > 0, a|lways pu|
|00000c00| 6c 6c 73 20 74 68 61 74 | 20 6d 61 6e 79 0a 66 69 |lls that| many.fi|
|00000c10| 6c 65 20 6e 61 6d 65 20 | 65 6c 65 6d 65 6e 74 73 |le name |elements|
|00000c20| 2e 20 20 41 72 67 75 6d | 65 6e 74 73 20 63 61 75 |. Argum|ents cau|
|00000c30| 73 65 20 6f 6e 6c 79 20 | 61 20 73 75 62 73 65 74 |se only |a subset|
|00000c40| 20 6f 66 20 62 75 66 66 | 65 72 73 20 74 6f 20 62 | of buff|ers to b|
|00000c50| 65 20 72 65 6e 61 6d 65 | 64 2e 1f 0a 28 64 65 66 |e rename|d...(def|
|00000c60| 61 6c 69 61 73 20 27 75 | 6e 69 71 75 69 66 79 2d |alias 'u|niquify-|
|00000c70| 72 61 74 69 6f 6e 61 6c | 69 7a 65 2d 66 69 6c 65 |rational|ize-file|
|00000c80| 2d 62 75 66 66 65 72 2d | 6e 61 6d 65 73 20 23 5b |-buffer-|names #[|
|00000c90| 28 26 6f 70 74 69 6f 6e | 61 6c 20 6e 65 77 62 75 |(&option|al newbu|
|00000ca0| 66 66 69 6c 65 20 6e 65 | 77 62 75 66 29 20 22 c0 |ffile ne|wbuf) ".|
|00000cb0| 89 09 1a 1b 1c c5 20 89 | 1e 06 83 6d 00 0e 06 40 |...... .|...m...@|
|00000cc0| 89 1e 07 0e 08 3d 83 26 | 00 0e 09 85 2a 00 ca 0e |.....=.&|....*...|
|00000cd0| 09 21 82 2a 00 cb 0e 07 | 21 89 1e 5c 66 85 34 00 |.!.*....|!..\f.4.|
|00000ce0| cd 0e 5c 66 21 89 1e 0e | 85 47 00 0e 09 3f 86 47 |..\f!...|.G...?.G|
|00000cf0| 00 0e 0e cd 0e 09 21 9a | 89 1e 0f 83 5b 00 0e 0e |......!.|....[...|
|00000d00| 0e 5c 66 0e 07 c0 46 5c | 66 42 14 82 63 00 d0 0e |.\f...F\|fB..c...|
|00000d10| 07 21 43 0b 42 13 2c 0e | 06 41 89 16 06 84 0e 00 |.!C.B.,.|.A......|
|00000d20| 29 d1 5c 66 d2 5c 22 14 | d3 5c 66 5c 6e 5c 22 88 |).\f.\".|.\f\n\".|
|00000d30| d4 d5 5c 66 5c 22 2b 87 | 22 20 5b 6e 69 6c 20 75 |..\f\"+.|" [nil u|
|00000d40| 6e 69 71 75 69 66 79 2d | 6d 69 6e 2d 64 69 72 2d |niquify-|min-dir-|
|00000d50| 63 6f 6e 74 65 6e 74 20 | 64 65 70 74 68 20 75 6e |content |depth un|
|00000d60| 69 71 75 69 66 79 2d 6e | 6f 6e 2d 66 69 6c 65 2d |iquify-n|on-file-|
|00000d70| 62 75 66 66 65 72 2d 6e | 61 6d 65 73 20 66 69 78 |buffer-n|ames fix|
|00000d80| 2d 6c 69 73 74 20 62 75 | 66 66 65 72 2d 6c 69 73 |-list bu|ffer-lis|
|00000d90| 74 20 62 75 66 66 65 72 | 73 20 62 75 66 66 65 72 |t buffer|s buffer|
|00000da0| 20 6e 65 77 62 75 66 20 | 6e 65 77 62 75 66 66 69 | newbuf |newbuffi|
|00000db0| 6c 65 20 65 78 70 61 6e | 64 2d 66 69 6c 65 2d 6e |le expan|d-file-n|
|00000dc0| 61 6d 65 20 75 6e 69 71 | 75 69 66 79 2d 62 75 66 |ame uniq|uify-buf|
|00000dd0| 66 65 72 2d 66 69 6c 65 | 2d 6e 61 6d 65 20 62 66 |fer-file|-name bf|
|00000de0| 6e 20 66 69 6c 65 2d 6e | 61 6d 65 2d 6e 6f 6e 64 |n file-n|ame-nond|
|00000df0| 69 72 65 63 74 6f 72 79 | 20 72 61 77 6e 61 6d 65 |irectory| rawname|
|00000e00| 20 64 65 73 65 72 76 69 | 6e 67 20 62 75 66 66 65 | deservi|ng buffe|
|00000e10| 72 2d 6e 61 6d 65 20 73 | 6f 72 74 20 75 6e 69 71 |r-name s|ort uniq|
|00000e20| 75 69 66 79 2d 66 69 78 | 2d 6c 69 73 74 2d 66 69 |uify-fix|-list-fi|
|00000e30| 6c 65 6e 61 6d 65 2d 6c | 65 73 73 70 20 75 6e 69 |lename-l|essp uni|
|00000e40| 71 75 69 66 79 2d 72 61 | 74 69 6f 6e 61 6c 69 7a |quify-ra|tionaliz|
|00000e50| 65 2d 61 2d 6c 69 73 74 | 20 6d 61 70 63 61 72 20 |e-a-list| mapcar |
|00000e60| 75 6e 69 71 75 69 66 79 | 2d 75 6e 72 61 74 69 6f |uniquify|-unratio|
|00000e70| 6e 61 6c 69 7a 65 64 2d | 62 75 66 66 65 72 5d 20 |nalized-|buffer] |
|00000e80| 35 20 28 23 24 20 2e 20 | 32 39 36 32 29 20 6e 69 |5 (#$ . |2962) ni|
|00000e90| 6c 5d 29 0a 23 40 31 32 | 33 20 52 65 74 75 72 6e |l]).#@12|3 Return|
|00000ea0| 20 6e 61 6d 65 20 6f 66 | 20 66 69 6c 65 20 42 55 | name of| file BU|
|00000eb0| 46 46 45 52 20 69 73 20 | 76 69 73 69 74 69 6e 67 |FFER is |visiting|
|00000ec0| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 6e 6f 6e 65 |, or nil| if none|
|00000ed0| 2e 0a 57 6f 72 6b 73 20 | 6f 6e 20 64 69 72 65 64 |..Works |on dired|
|00000ee0| 20 62 75 66 66 65 72 73 | 20 61 73 20 77 65 6c 6c | buffers| as well|
|00000ef0| 20 61 73 20 6f 72 64 69 | 6e 61 72 79 20 66 69 6c | as ordi|nary fil|
|00000f00| 65 2d 76 69 73 69 74 69 | 6e 67 20 62 75 66 66 65 |e-visiti|ng buffe|
|00000f10| 72 73 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |rs...(de|falias '|
|00000f20| 75 6e 69 71 75 69 66 79 | 2d 62 75 66 66 65 72 2d |uniquify|-buffer-|
|00000f30| 66 69 6c 65 2d 6e 61 6d | 65 20 23 5b 28 62 75 66 |file-nam|e #[(buf|
|00000f40| 66 65 72 29 20 22 c0 09 | 21 86 5c 66 00 8a 09 71 |fer) "..|!.\f...q|
|00000f50| 88 5c 6e 29 87 22 20 5b | 62 75 66 66 65 72 2d 66 |.\n)." [|buffer-f|
|00000f60| 69 6c 65 2d 6e 61 6d 65 | 20 62 75 66 66 65 72 20 |ile-name| buffer |
|00000f70| 6c 69 73 74 2d 62 75 66 | 66 65 72 73 2d 64 69 72 |list-buf|fers-dir|
|00000f80| 65 63 74 6f 72 79 5d 20 | 32 20 28 23 24 20 2e 20 |ectory] |2 (#$ . |
|00000f90| 33 37 33 38 29 5d 29 0a | 28 64 65 66 61 6c 69 61 |3738)]).|(defalia|
|00000fa0| 73 20 27 75 6e 69 71 75 | 69 66 79 2d 66 69 78 2d |s 'uniqu|ify-fix-|
|00000fb0| 6c 69 73 74 2d 66 69 6c | 65 6e 61 6d 65 2d 6c 65 |list-fil|ename-le|
|00000fc0| 73 73 70 20 23 5b 28 66 | 69 78 6c 69 73 74 31 20 |ssp #[(f|ixlist1 |
|00000fd0| 66 69 78 6c 69 73 74 32 | 29 20 22 c0 09 41 40 5c |fixlist2|) "..A@\|
|00000fe0| 6e 41 40 5c 22 87 22 20 | 5b 75 6e 69 71 75 69 66 |nA@\"." |[uniquif|
|00000ff0| 79 2d 66 69 6c 65 6e 61 | 6d 65 2d 6c 65 73 73 70 |y-filena|me-lessp|
|00001000| 20 66 69 78 6c 69 73 74 | 31 20 66 69 78 6c 69 73 | fixlist|1 fixlis|
|00001010| 74 32 5d 20 33 5d 29 0a | 28 64 65 66 61 6c 69 61 |t2] 3]).|(defalia|
|00001020| 73 20 27 75 6e 69 71 75 | 69 66 79 2d 66 69 6c 65 |s 'uniqu|ify-file|
|00001030| 6e 61 6d 65 2d 6c 65 73 | 73 70 20 23 5b 28 73 31 |name-les|sp #[(s1|
|00001040| 20 73 32 29 20 22 c0 09 | 21 c0 5c 6e 21 1b 1c 0b | s2) "..|!.\n!...|
|00001050| c5 9a 3f 85 43 00 5c 66 | 0b 99 86 43 00 5c 66 0b |..?.C.\f|...C.\f.|
|00001060| 9a 85 43 00 c6 09 21 c6 | 5c 6e 21 1e 07 1e 08 0e |..C...!.|\n!.....|
|00001070| 07 47 c9 58 3f 85 42 00 | 0e 08 47 c9 58 86 42 00 |.G.X?.B.|..G.X.B.|
|00001080| ca 0e 08 cb cc 4f 0e 07 | cb cc 4f 5c 22 2a 2a 87 |.....O..|..O\"**.|
|00001090| 22 20 5b 66 69 6c 65 2d | 6e 61 6d 65 2d 6e 6f 6e |" [file-|name-non|
|000010a0| 64 69 72 65 63 74 6f 72 | 79 20 73 31 20 73 32 20 |director|y s1 s2 |
|000010b0| 73 32 66 20 73 31 66 20 | 22 22 20 66 69 6c 65 2d |s2f s1f |"" file-|
|000010c0| 6e 61 6d 65 2d 64 69 72 | 65 63 74 6f 72 79 20 73 |name-dir|ectory s|
|000010d0| 32 64 20 73 31 64 20 31 | 20 75 6e 69 71 75 69 66 |2d s1d 1| uniquif|
|000010e0| 79 2d 66 69 6c 65 6e 61 | 6d 65 2d 6c 65 73 73 70 |y-filena|me-lessp|
|000010f0| 20 30 20 2d 31 5d 20 35 | 5d 29 0a 28 64 65 66 61 | 0 -1] 5|]).(defa|
|00001100| 6c 69 61 73 20 27 75 6e | 69 71 75 69 66 79 2d 75 |lias 'un|iquify-u|
|00001110| 6e 72 61 74 69 6f 6e 61 | 6c 69 7a 65 64 2d 62 75 |nrationa|lized-bu|
|00001120| 66 66 65 72 20 23 5b 28 | 69 74 65 6d 29 20 22 08 |ffer #[(|item) ".|
|00001130| 41 41 41 40 87 22 20 5b | 69 74 65 6d 5d 20 31 5d |AAA@." [|item] 1]|
|00001140| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 75 6e 69 |).(defal|ias 'uni|
|00001150| 71 75 69 66 79 2d 72 61 | 74 69 6f 6e 61 6c 69 7a |quify-ra|tionaliz|
|00001160| 65 2d 61 2d 6c 69 73 74 | 20 23 5b 28 66 69 78 2d |e-a-list| #[(fix-|
|00001170| 6c 69 73 74 20 64 65 70 | 74 68 29 20 22 c0 c1 c0 |list dep|th) "...|
|00001180| 89 1a 1b 1c 1d 0e 06 83 | 39 00 0e 06 40 1e 07 c8 |........|9...@...|
|00001190| 0e 07 0e 09 5c 22 89 13 | 5c 66 9a 84 28 00 ca 0d |....\"..|\f..(...|
|000011a0| 5c 66 0e 09 23 88 c0 15 | 0e 07 0d 42 15 0b 14 29 |\f..#...|...B...)|
|000011b0| 0e 06 41 89 16 06 84 0d | 00 ca 0d 5c 66 0e 09 23 |..A.....|...\f..#|
|000011c0| 2c 87 22 20 5b 6e 69 6c | 20 22 22 20 75 6e 69 71 |,." [nil| "" uniq|
|000011d0| 75 69 66 79 2d 70 6f 73 | 73 69 62 6c 79 2d 72 65 |uify-pos|sibly-re|
|000011e0| 73 6f 6c 76 61 62 6c 65 | 20 70 72 6f 70 6f 73 65 |solvable| propose|
|000011f0| 64 2d 6e 61 6d 65 20 6f | 6c 64 2d 6e 61 6d 65 20 |d-name o|ld-name |
|00001200| 63 6f 6e 66 6c 69 63 74 | 69 6e 67 2d 73 75 62 6c |conflict|ing-subl|
|00001210| 69 73 74 20 66 69 78 2d | 6c 69 73 74 20 69 74 65 |ist fix-|list ite|
|00001220| 6d 20 75 6e 69 71 75 69 | 66 79 2d 67 65 74 2d 70 |m uniqui|fy-get-p|
|00001230| 72 6f 70 6f 73 65 64 2d | 6e 61 6d 65 20 64 65 70 |roposed-|name dep|
|00001240| 74 68 20 75 6e 69 71 75 | 69 66 79 2d 72 61 74 69 |th uniqu|ify-rati|
|00001250| 6f 6e 61 6c 69 7a 65 2d | 63 6f 6e 66 6c 69 63 74 |onalize-|conflict|
|00001260| 69 6e 67 2d 73 75 62 6c | 69 73 74 5d 20 35 5d 29 |ing-subl|ist] 5])|
|00001270| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 75 6e 69 71 |.(defali|as 'uniq|
|00001280| 75 69 66 79 2d 67 65 74 | 2d 70 72 6f 70 6f 73 65 |uify-get|-propose|
|00001290| 64 2d 6e 61 6d 65 20 23 | 5b 28 69 74 65 6d 20 64 |d-name #|[(item d|
|000012a0| 65 70 74 68 29 20 22 c0 | c1 5c 6e 0b 40 0b 41 40 |epth) ".|.\n.@.A@|
|000012b0| 1c 1d 1e 06 1e 07 1e 08 | 0e 06 c9 56 83 4a 00 ca |........|...V.J..|
|000012c0| cb cc 0e 07 21 cc 0d 21 | cd 52 5c 66 5c 22 89 16 |....!..!|.R\f\"..|
|000012d0| 08 83 4a 00 5c 66 0e 08 | c9 55 83 36 00 c9 82 39 |..J.\f..|.U.6...9|
|000012e0| 00 0e 08 54 5c 66 47 0d | 47 5a 4f 16 07 0e 06 53 |...T\fG.|GZO....S|
|000012f0| 89 16 06 82 12 00 0e 06 | c9 55 83 54 00 ce 16 0f |........|.U.T....|
|00001300| 0e 10 83 83 00 d1 5c 66 | 21 83 83 00 0d c1 98 84 |......\f|!.......|
|00001310| 83 00 0e 12 d3 3d 83 73 | 00 0d d4 50 15 82 83 00 |.....=.s|...P....|
|00001320| 0e 12 d5 3d 83 83 00 0e | 16 86 80 00 d7 0d 50 15 |...=....|......P.|
|00001330| 0e 07 c1 98 84 a3 00 0e | 12 d8 3d 84 98 00 0e 12 |........|..=.....|
|00001340| d9 3d 83 a3 00 0e 07 c9 | 0e 07 47 da 5a 4f 16 07 |.=......|..G.ZO..|
|00001350| 0e 07 c1 98 83 ae 00 0d | 82 00 01 0d c1 98 83 b9 |........|........|
|00001360| 00 0e 07 82 00 01 0e 12 | d3 3d 83 c7 00 0e 07 0d |........|.=......|
|00001370| 50 82 00 01 0e 12 d5 3d | 83 d7 00 0d db 0e 07 21 |P......=|.......!|
|00001380| 50 82 00 01 0e 12 d8 3d | 83 eb 00 0d 0e 16 86 e5 |P......=|........|
|00001390| 00 dc 0e 07 51 82 00 01 | 0e 12 d9 3d 83 fb 00 0d |....Q...|...=....|
|000013a0| dd 0e 07 de 52 82 00 01 | df e0 0e 12 5c 22 2d 87 |....R...|....\"-.|
|000013b0| 22 20 5b 6e 69 6c 20 22 | 22 20 64 65 70 74 68 20 |" [nil "|" depth |
|000013c0| 69 74 65 6d 20 66 6e 20 | 62 61 73 65 20 6e 20 65 |item fn |base n e|
|000013d0| 78 74 72 61 2d 73 74 72 | 69 6e 67 20 69 6e 64 65 |xtra-str|ing inde|
|000013e0| 78 20 30 20 73 74 72 69 | 6e 67 2d 6d 61 74 63 68 |x 0 stri|ng-match|
|000013f0| 20 22 5c 5c 28 5e 5c 5c | 7c 2f 5b 5e 2f 5d 2a 5c | "\\(^\\||/[^/]*\|
|00001400| 5c 29 2f 22 20 72 65 67 | 65 78 70 2d 71 75 6f 74 |\)/" reg|exp-quot|
|00001410| 65 20 22 5c 5c 27 22 20 | 74 20 75 6e 69 71 75 69 |e "\\'" |t uniqui|
|00001420| 66 79 2d 70 6f 73 73 69 | 62 6c 79 2d 72 65 73 6f |fy-possi|bly-reso|
|00001430| 6c 76 61 62 6c 65 20 75 | 6e 69 71 75 69 66 79 2d |lvable u|niquify-|
|00001440| 74 72 61 69 6c 69 6e 67 | 2d 73 65 70 61 72 61 74 |trailing|-separat|
|00001450| 6f 72 2d 70 20 66 69 6c | 65 2d 64 69 72 65 63 74 |or-p fil|e-direct|
|00001460| 6f 72 79 2d 70 20 75 6e | 69 71 75 69 66 79 2d 62 |ory-p un|iquify-b|
|00001470| 75 66 66 65 72 2d 6e 61 | 6d 65 2d 73 74 79 6c 65 |uffer-na|me-style|
|00001480| 20 66 6f 72 77 61 72 64 | 20 22 2f 22 20 72 65 76 | forward| "/" rev|
|00001490| 65 72 73 65 20 75 6e 69 | 71 75 69 66 79 2d 73 65 |erse uni|quify-se|
|000014a0| 70 61 72 61 74 6f 72 20 | 22 5c 5c 22 20 70 6f 73 |parator |"\\" pos|
|000014b0| 74 2d 66 6f 72 77 61 72 | 64 20 70 6f 73 74 2d 66 |t-forwar|d post-f|
|000014c0| 6f 72 77 61 72 64 2d 61 | 6e 67 6c 65 2d 62 72 61 |orward-a|ngle-bra|
|000014d0| 63 6b 65 74 73 20 31 20 | 75 6e 69 71 75 69 66 79 |ckets 1 |uniquify|
|000014e0| 2d 72 65 76 65 72 73 65 | 2d 63 6f 6d 70 6f 6e 65 |-reverse|-compone|
|000014f0| 6e 74 73 20 22 7c 22 20 | 22 3c 22 20 22 3e 22 20 |nts "|" |"<" ">" |
|00001500| 65 72 72 6f 72 20 22 42 | 61 64 20 76 61 6c 75 65 |error "B|ad value|
|00001510| 20 66 6f 72 20 75 6e 69 | 71 75 69 66 79 2d 62 75 | for uni|quify-bu|
|00001520| 66 66 65 72 2d 6e 61 6d | 65 2d 73 74 79 6c 65 3a |ffer-nam|e-style:|
|00001530| 20 25 73 22 5d 20 36 5d | 29 0a 28 64 65 66 61 6c | %s"] 6]|).(defal|
|00001540| 69 61 73 20 27 75 6e 69 | 71 75 69 66 79 2d 72 61 |ias 'uni|quify-ra|
|00001550| 74 69 6f 6e 61 6c 69 7a | 65 2d 63 6f 6e 66 6c 69 |tionaliz|e-confli|
|00001560| 63 74 69 6e 67 2d 73 75 | 62 6c 69 73 74 20 23 5b |cting-su|blist #[|
|00001570| 28 63 6f 6e 66 6c 69 63 | 74 69 6e 67 2d 73 75 62 |(conflic|ting-sub|
|00001580| 6c 69 73 74 20 6f 6c 64 | 2d 6e 61 6d 65 20 64 65 |list old|-name de|
|00001590| 70 74 68 29 20 22 08 3f | 86 2c 00 08 41 84 21 00 |pth) ".?|.,..A.!.|
|000015a0| c1 5c 6e 0b 5c 22 84 21 | 00 5c 6e c4 98 84 1f 00 |.\n.\".!|.\n.....|
|000015b0| c5 08 40 5c 6e 5c 22 86 | 2c 00 c6 87 0e 07 85 2c |..@\n\".|,......,|
|000015c0| 00 c8 08 0e 09 54 5c 22 | 87 22 20 5b 63 6f 6e 66 |.....T\"|." [conf|
|000015d0| 6c 69 63 74 69 6e 67 2d | 73 75 62 6c 69 73 74 20 |licting-|sublist |
|000015e0| 61 73 73 6f 63 20 6f 6c | 64 2d 6e 61 6d 65 20 75 |assoc ol|d-name u|
|000015f0| 6e 69 71 75 69 66 79 2d | 6e 6f 6e 2d 66 69 6c 65 |niquify-|non-file|
|00001600| 2d 62 75 66 66 65 72 2d | 6e 61 6d 65 73 20 22 22 |-buffer-|names ""|
|00001610| 20 75 6e 69 71 75 69 66 | 79 2d 72 65 6e 61 6d 65 | uniquif|y-rename|
|00001620| 2d 62 75 66 66 65 72 20 | 74 20 75 6e 69 71 75 69 |-buffer |t uniqui|
|00001630| 66 79 2d 70 6f 73 73 69 | 62 6c 79 2d 72 65 73 6f |fy-possi|bly-reso|
|00001640| 6c 76 61 62 6c 65 20 75 | 6e 69 71 75 69 66 79 2d |lvable u|niquify-|
|00001650| 72 61 74 69 6f 6e 61 6c | 69 7a 65 2d 61 2d 6c 69 |rational|ize-a-li|
|00001660| 73 74 20 64 65 70 74 68 | 5d 20 33 5d 29 0a 28 64 |st depth|] 3]).(d|
|00001670| 65 66 61 6c 69 61 73 20 | 27 75 6e 69 71 75 69 66 |efalias |'uniquif|
|00001680| 79 2d 72 65 6e 61 6d 65 | 2d 62 75 66 66 65 72 20 |y-rename|-buffer |
|00001690| 23 5b 28 69 74 65 6d 20 | 6e 65 77 6e 61 6d 65 29 |#[(item |newname)|
|000016a0| 20 22 08 41 41 40 19 5c | 6e c3 09 21 9a 84 1e 00 | ".AA@.\|n..!....|
|000016b0| 70 c4 1d 1e 06 09 71 88 | c7 5c 6e 21 88 0e 06 71 |p.....q.|.\n!...q|
|000016c0| 88 2a 29 c8 08 9b c9 a0 | 87 22 20 5b 69 74 65 6d |.*).....|." [item|
|000016d0| 20 62 75 66 66 65 72 20 | 6e 65 77 6e 61 6d 65 20 | buffer |newname |
|000016e0| 62 75 66 66 65 72 2d 6e | 61 6d 65 20 6e 69 6c 20 |buffer-n|ame nil |
|000016f0| 75 6e 69 71 75 69 66 79 | 2d 62 75 66 66 65 72 2d |uniquify|-buffer-|
|00001700| 6e 61 6d 65 2d 73 74 79 | 6c 65 20 75 6e 73 65 74 |name-sty|le unset|
|00001710| 20 72 65 6e 61 6d 65 2d | 62 75 66 66 65 72 20 33 | rename-|buffer 3|
|00001720| 20 74 5d 20 33 5d 29 0a | 28 64 65 66 61 6c 69 61 | t] 3]).|(defalia|
|00001730| 73 20 27 75 6e 69 71 75 | 69 66 79 2d 72 65 76 65 |s 'uniqu|ify-reve|
|00001740| 72 73 65 2d 63 6f 6d 70 | 6f 6e 65 6e 74 73 20 23 |rse-comp|onents #|
|00001750| 5b 28 69 6e 73 74 72 69 | 6e 67 29 20 22 c0 c1 5c |[(instri|ng) "..\|
|00001760| 6e 47 0b 86 09 00 c4 1d | 1e 06 1e 07 1e 08 0e 07 |nG......|........|
|00001770| 0e 06 57 83 50 00 5c 6e | 0e 07 48 c9 55 83 30 00 |..W.P.\n|..H.U.0.|
|00001780| 0d 0e 08 42 16 08 0e 07 | 54 89 16 07 82 12 00 ca |...B....|T.......|
|00001790| cb 5c 6e 0e 07 23 86 3b | 00 0e 06 1e 5c 66 5c 6e |.\n..#.;|....\f\n|
|000017a0| 0e 07 0e 5c 66 4f 0e 08 | 42 16 08 0e 5c 66 16 07 |...\fO..|B...\f..|
|000017b0| 29 82 10 00 cd ce 0e 08 | 5c 22 2c 87 22 20 5b 6e |).......|\",." [n|
|000017c0| 69 6c 20 30 20 69 6e 73 | 74 72 69 6e 67 20 75 6e |il 0 ins|tring un|
|000017d0| 69 71 75 69 66 79 2d 73 | 65 70 61 72 61 74 6f 72 |iquify-s|eparator|
|000017e0| 20 22 5c 5c 22 20 73 65 | 70 20 6c 65 6e 20 63 75 | "\\" se|p len cu|
|000017f0| 72 73 6f 72 20 73 6f 66 | 61 72 20 34 37 20 73 74 |rsor sof|ar 47 st|
|00001800| 72 69 6e 67 2d 6d 61 74 | 63 68 20 22 2f 22 20 66 |ring-mat|ch "/" f|
|00001810| 69 72 73 74 2d 73 6c 61 | 73 68 20 61 70 70 6c 79 |irst-sla|sh apply|
|00001820| 20 63 6f 6e 63 61 74 5d | 20 35 5d 29 0a 28 62 79 | concat]| 5]).(by|
|00001830| 74 65 2d 63 6f 64 65 20 | 22 c0 c1 c2 c3 c4 24 88 |te-code |".....$.|
|00001840| c5 c1 c4 5c 22 88 c0 c6 | c7 c3 c4 24 88 c5 c6 c4 |...\"...|...$....|
|00001850| 5c 22 87 22 20 5b 61 64 | 2d 61 64 64 2d 61 64 76 |\"." [ad|-add-adv|
|00001860| 69 63 65 20 72 65 6e 61 | 6d 65 2d 62 75 66 66 65 |ice rena|me-buffe|
|00001870| 72 20 28 72 65 6e 61 6d | 65 2d 62 75 66 66 65 72 |r (renam|e-buffer|
|00001880| 2d 75 6e 69 71 75 69 66 | 79 20 6e 69 6c 20 74 20 |-uniquif|y nil t |
|00001890| 28 61 64 76 69 63 65 20 | 6c 61 6d 62 64 61 20 6e |(advice |lambda n|
|000018a0| 69 6c 20 22 55 6e 69 71 | 75 69 66 79 20 62 75 66 |il "Uniq|uify buf|
|000018b0| 66 65 72 20 6e 61 6d 65 | 73 20 77 69 74 68 20 70 |fer name|s with p|
|000018c0| 61 72 74 73 20 6f 66 20 | 64 69 72 65 63 74 6f 72 |arts of |director|
|000018d0| 79 20 6e 61 6d 65 2e 22 | 20 28 69 66 20 28 61 6e |y name."| (if (an|
|000018e0| 64 20 75 6e 69 71 75 69 | 66 79 2d 62 75 66 66 65 |d uniqui|fy-buffe|
|000018f0| 72 2d 6e 61 6d 65 2d 73 | 74 79 6c 65 20 28 61 64 |r-name-s|tyle (ad|
|00001900| 2d 67 65 74 2d 61 72 67 | 20 31 29 29 20 28 70 72 |-get-arg| 1)) (pr|
|00001910| 6f 67 6e 20 28 69 66 20 | 75 6e 69 71 75 69 66 79 |ogn (if |uniquify|
|00001920| 2d 61 66 74 65 72 2d 6b | 69 6c 6c 2d 62 75 66 66 |-after-k|ill-buff|
|00001930| 65 72 2d 70 20 28 75 6e | 69 71 75 69 66 79 2d 72 |er-p (un|iquify-r|
|00001940| 61 74 69 6f 6e 61 6c 69 | 7a 65 2d 66 69 6c 65 2d |ationali|ze-file-|
|00001950| 62 75 66 66 65 72 2d 6e | 61 6d 65 73 29 20 28 75 |buffer-n|ames) (u|
|00001960| 6e 69 71 75 69 66 79 2d | 72 61 74 69 6f 6e 61 6c |niquify-|rational|
|00001970| 69 7a 65 2d 66 69 6c 65 | 2d 62 75 66 66 65 72 2d |ize-file|-buffer-|
|00001980| 6e 61 6d 65 73 20 28 75 | 6e 69 71 75 69 66 79 2d |names (u|niquify-|
|00001990| 62 75 66 66 65 72 2d 66 | 69 6c 65 2d 6e 61 6d 65 |buffer-f|ile-name|
|000019a0| 20 28 63 75 72 72 65 6e | 74 2d 62 75 66 66 65 72 | (curren|t-buffer|
|000019b0| 29 29 20 28 63 75 72 72 | 65 6e 74 2d 62 75 66 66 |)) (curr|ent-buff|
|000019c0| 65 72 29 29 29 20 28 73 | 65 74 71 20 61 64 2d 72 |er))) (s|etq ad-r|
|000019d0| 65 74 75 72 6e 2d 76 61 | 6c 75 65 20 28 62 75 66 |eturn-va|lue (buf|
|000019e0| 66 65 72 2d 6e 61 6d 65 | 20 28 63 75 72 72 65 6e |fer-name| (curren|
|000019f0| 74 2d 62 75 66 66 65 72 | 29 29 29 29 29 29 29 20 |t-buffer|))))))) |
|00001a00| 61 66 74 65 72 20 6e 69 | 6c 20 61 64 2d 61 63 74 |after ni|l ad-act|
|00001a10| 69 76 61 74 65 2d 6f 6e | 20 63 72 65 61 74 65 2d |ivate-on| create-|
|00001a20| 66 69 6c 65 2d 62 75 66 | 66 65 72 20 28 63 72 65 |file-buf|fer (cre|
|00001a30| 61 74 65 2d 66 69 6c 65 | 2d 62 75 66 66 65 72 2d |ate-file|-buffer-|
|00001a40| 75 6e 69 71 75 69 66 79 | 20 6e 69 6c 20 74 20 28 |uniquify| nil t (|
|00001a50| 61 64 76 69 63 65 20 6c | 61 6d 62 64 61 20 6e 69 |advice l|ambda ni|
|00001a60| 6c 20 22 55 6e 69 71 75 | 69 66 79 20 62 75 66 66 |l "Uniqu|ify buff|
|00001a70| 65 72 20 6e 61 6d 65 73 | 20 77 69 74 68 20 70 61 |er names| with pa|
|00001a80| 72 74 73 20 6f 66 20 64 | 69 72 65 63 74 6f 72 79 |rts of d|irectory|
|00001a90| 20 6e 61 6d 65 2e 22 20 | 28 69 66 20 75 6e 69 71 | name." |(if uniq|
|00001aa0| 75 69 66 79 2d 62 75 66 | 66 65 72 2d 6e 61 6d 65 |uify-buf|fer-name|
|00001ab0| 2d 73 74 79 6c 65 20 28 | 75 6e 69 71 75 69 66 79 |-style (|uniquify|
|00001ac0| 2d 72 61 74 69 6f 6e 61 | 6c 69 7a 65 2d 66 69 6c |-rationa|lize-fil|
|00001ad0| 65 2d 62 75 66 66 65 72 | 2d 6e 61 6d 65 73 20 28 |e-buffer|-names (|
|00001ae0| 61 64 2d 67 65 74 2d 61 | 72 67 20 30 29 20 61 64 |ad-get-a|rg 0) ad|
|00001af0| 2d 72 65 74 75 72 6e 2d | 76 61 6c 75 65 29 29 29 |-return-|value)))|
|00001b00| 29 5d 20 35 29 0a 23 40 | 31 35 34 20 41 64 64 20 |)] 5).#@|154 Add |
|00001b10| 60 64 65 6c 61 79 65 64 | 2d 75 6e 69 71 75 69 66 |`delayed|-uniquif|
|00001b20| 79 2d 72 61 74 69 6f 6e | 61 6c 69 7a 65 2d 66 69 |y-ration|alize-fi|
|00001b30| 6c 65 2d 62 75 66 66 65 | 72 2d 6e 61 6d 65 73 27 |le-buffe|r-names'|
|00001b40| 20 74 6f 20 60 70 6f 73 | 74 2d 63 6f 6d 6d 61 6e | to `pos|t-comman|
|00001b50| 64 2d 68 6f 6f 6b 27 2e | 0a 46 6f 72 20 75 73 65 |d-hook'.|.For use|
|00001b60| 20 6f 6e 2c 20 65 67 2c | 20 60 6b 69 6c 6c 2d 62 | on, eg,| `kill-b|
|00001b70| 75 66 66 65 72 2d 68 6f | 6f 6b 27 2c 20 74 6f 20 |uffer-ho|ok', to |
|00001b80| 72 61 74 69 6f 6e 61 6c | 69 7a 65 20 2a 61 66 74 |rational|ize *aft|
|00001b90| 65 72 2a 20 62 75 66 66 | 65 72 20 64 65 6c 65 74 |er* buff|er delet|
|00001ba0| 69 6f 6e 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |ion...(d|efalias |
|00001bb0| 27 64 65 6c 61 79 2d 75 | 6e 69 71 75 69 66 79 2d |'delay-u|niquify-|
|00001bc0| 72 61 74 69 6f 6e 61 6c | 69 7a 65 2d 66 69 6c 65 |rational|ize-file|
|00001bd0| 2d 62 75 66 66 65 72 2d | 6e 61 6d 65 73 20 23 5b |-buffer-|names #[|
|00001be0| 6e 69 6c 20 22 08 85 5c | 66 00 09 85 5c 66 00 c2 |nil "..\|f...\f..|
|00001bf0| c3 c4 5c 22 87 22 20 5b | 75 6e 69 71 75 69 66 79 |..\"." [|uniquify|
|00001c00| 2d 62 75 66 66 65 72 2d | 6e 61 6d 65 2d 73 74 79 |-buffer-|name-sty|
|00001c10| 6c 65 20 75 6e 69 71 75 | 69 66 79 2d 61 66 74 65 |le uniqu|ify-afte|
|00001c20| 72 2d 6b 69 6c 6c 2d 62 | 75 66 66 65 72 2d 70 20 |r-kill-b|uffer-p |
|00001c30| 61 64 64 2d 68 6f 6f 6b | 20 70 6f 73 74 2d 63 6f |add-hook| post-co|
|00001c40| 6d 6d 61 6e 64 2d 68 6f | 6f 6b 20 64 65 6c 61 79 |mmand-ho|ok delay|
|00001c50| 65 64 2d 75 6e 69 71 75 | 69 66 79 2d 72 61 74 69 |ed-uniqu|ify-rati|
|00001c60| 6f 6e 61 6c 69 7a 65 2d | 66 69 6c 65 2d 62 75 66 |onalize-|file-buf|
|00001c70| 66 65 72 2d 6e 61 6d 65 | 73 5d 20 33 20 28 23 24 |fer-name|s] 3 (#$|
|00001c80| 20 2e 20 36 39 32 34 29 | 5d 29 0a 23 40 31 33 34 | . 6924)|]).#@134|
|00001c90| 20 52 65 72 61 74 69 6f | 6e 61 6c 69 7a 65 20 62 | Reratio|nalize b|
|00001ca0| 75 66 66 65 72 20 6e 61 | 6d 65 73 20 61 6e 64 20 |uffer na|mes and |
|00001cb0| 72 65 6d 6f 76 65 20 73 | 65 6c 66 20 66 72 6f 6d |remove s|elf from|
|00001cc0| 20 60 70 6f 73 74 2d 63 | 6f 6d 6d 61 6e 64 2d 68 | `post-c|ommand-h|
|00001cd0| 6f 6f 6b 27 2e 0a 53 65 | 65 20 61 6c 73 6f 20 60 |ook'..Se|e also `|
|00001ce0| 64 65 6c 61 79 2d 72 61 | 74 69 6f 6e 61 6c 69 7a |delay-ra|tionaliz|
|00001cf0| 65 2d 66 69 6c 65 2d 62 | 75 66 66 65 72 2d 6e 61 |e-file-b|uffer-na|
|00001d00| 6d 65 73 27 20 66 6f 72 | 20 68 6f 6f 6b 20 73 65 |mes' for| hook se|
|00001d10| 74 74 65 72 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |tter...(|defalias|
|00001d20| 20 27 64 65 6c 61 79 65 | 64 2d 75 6e 69 71 75 69 | 'delaye|d-uniqui|
|00001d30| 66 79 2d 72 61 74 69 6f | 6e 61 6c 69 7a 65 2d 66 |fy-ratio|nalize-f|
|00001d40| 69 6c 65 2d 62 75 66 66 | 65 72 2d 6e 61 6d 65 73 |ile-buff|er-names|
|00001d50| 20 23 5b 6e 69 6c 20 22 | c0 20 88 c1 c2 c3 5c 22 | #[nil "|. ....\"|
|00001d60| 87 22 20 5b 75 6e 69 71 | 75 69 66 79 2d 72 61 74 |." [uniq|uify-rat|
|00001d70| 69 6f 6e 61 6c 69 7a 65 | 2d 66 69 6c 65 2d 62 75 |ionalize|-file-bu|
|00001d80| 66 66 65 72 2d 6e 61 6d | 65 73 20 72 65 6d 6f 76 |ffer-nam|es remov|
|00001d90| 65 2d 68 6f 6f 6b 20 70 | 6f 73 74 2d 63 6f 6d 6d |e-hook p|ost-comm|
|00001da0| 61 6e 64 2d 68 6f 6f 6b | 20 64 65 6c 61 79 65 64 |and-hook| delayed|
|00001db0| 2d 75 6e 69 71 75 69 66 | 79 2d 72 61 74 69 6f 6e |-uniquif|y-ration|
|00001dc0| 61 6c 69 7a 65 2d 66 69 | 6c 65 2d 62 75 66 66 65 |alize-fi|le-buffe|
|00001dd0| 72 2d 6e 61 6d 65 73 5d | 20 33 20 28 23 24 20 2e |r-names]| 3 (#$ .|
|00001de0| 20 37 33 31 33 29 5d 29 | 0a 28 61 64 64 2d 68 6f | 7313)])|.(add-ho|
|00001df0| 6f 6b 20 28 71 75 6f 74 | 65 20 6b 69 6c 6c 2d 62 |ok (quot|e kill-b|
|00001e00| 75 66 66 65 72 2d 68 6f | 6f 6b 29 20 28 71 75 6f |uffer-ho|ok) (quo|
|00001e10| 74 65 20 64 65 6c 61 79 | 2d 75 6e 69 71 75 69 66 |te delay|-uniquif|
|00001e20| 79 2d 72 61 74 69 6f 6e | 61 6c 69 7a 65 2d 66 69 |y-ration|alize-fi|
|00001e30| 6c 65 2d 62 75 66 66 65 | 72 2d 6e 61 6d 65 73 29 |le-buffe|r-names)|
|00001e40| 29 0a | |). | |
+--------+-------------------------+-------------------------+--------+--------+